/*
 * ULSF Sagittarius IDA
 * Copyright (C) 2012, John Pritchard, all rights reserved.
 * 
 * This program is free software: you can redistribute it and/or
 * modify it under the terms of the GNU General Public License as
 * published by the Free Software Foundation, either version 3 of the
 * License, or (at your option) any later version.
 *
 * This program is distributed in the hope that it will be useful, but
 * WITHOUT ANY WARRANTY; without even the implied warranty of
 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
 * General Public License for more details.
 *
 * You should have received a copy of the GNU General Public License
 * along with this program.  If not, see
 * <http://www.gnu.org/licenses/>.
 */
package sagittarius.design;

import sagittarius.Field;
import sagittarius.Visualization;

/**
 * This {@link Volume} operator for {@link SectionHyperbolic}
 * operators defines a {@link SearsHaack Sears-Haack} body in {@link
 * SectionHyperbolic hyperbolic sections}.
 */
public class SearsHaackHyperbolic
    extends SearsHaack.RL
{

    public SearsHaackHyperbolic(Visualization data, double radius, double length){
        super(data,radius,length);
    }
    public SearsHaackHyperbolic(Visualization data){
        super(data);
    }


    @Override
    public SectionHyperbolic stationForX(double station, double x){

        Section.Key key = new Section.Key(station);
        SectionHyperbolicSpheroid section = (SectionHyperbolicSpheroid)this.get(key);
        if (null == section){
            section = new SectionHyperbolicSpheroid(this,station);
            this.put(key,section);
        }
        return section;
    }

}
